package com.lantosec.hmrp.modules.system.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.system.entity.SysUreport;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * UReport定义 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-18
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "SysUreport对象", description = "UReport定义")
public class SysUreportVO extends BaseVO<SysUreport> {
    private static final long serialVersionUID = 1L;


    public SysUreportVO(SysUreport entity) {
        this.ureportId = entity.getUreportId();
        this.ureportType = entity.getUreportType();
        this.ureportName = entity.getUreportName();
        this.downloadName = entity.getDownloadName();
        this.ureportContent = entity.getUreportContent();
        this.updateDate = entity.getUpdateDate();
    }

    @Override
    public SysUreport convertToEntity() {
        return new SysUreport(this);
    }


    @ApiModelProperty(value = "ID")
    @TableId(value = "ureport_id", type = IdType.AUTO)
    private Integer ureportId;

    @ApiModelProperty(value = "类型(1流程)")
    private Integer ureportType;

    @ApiModelProperty(value = "报表名称")
    private String ureportName;

    @ApiModelProperty(value = "下载文件名称")
    private String downloadName;

    @ApiModelProperty(value = "报表内容")
    private String ureportContent;

    @ApiModelProperty(value = "最后更新时间")
    private Date updateDate;
}
